package com.etheart.framework.core.fulltextsearch;

import java.util.List;

import org.apache.lucene.search.SortField;

import com.etheart.framework.core.fulltextsearch.filter.Filter;


public class FullTextQueryParameter<T> {

	private Class<T> clazz;

	private String keyword;

	private String[] fields;
	
	private List<String[]> special;

	private SortField[] sortFields;

	private Filter[] filters;
	
	private boolean highlight =false;
  
	public FullTextQueryParameter(Class<T> clazz, String keyword,
			 String... fields) {
		this(clazz, keyword, null, fields, (SortField[])null);
	}
	
	public FullTextQueryParameter(Class<T> clazz, String keyword,
			List<String[]> special, String... fields) {
		this(clazz, keyword,special , fields, (SortField[])null);
	}

	public FullTextQueryParameter(Class<T> clazz, String keyword,
			List<String[]> special, String[] fields, SortField... sortFields){
		this(clazz, keyword, special, fields, sortFields, (Filter[]) null);
	}

	public FullTextQueryParameter(Class<T> clazz, String keyword,
			List<String[]> special, String[] fields, SortField[] sortFields, Filter... filters){
		this.clazz = clazz;
		this.keyword = keyword;  
		this.fields = fields;
		this.sortFields = sortFields;
		this.filters = filters;
		this.special = special;
	}

	public SortField[] getSortFields() {
		return sortFields;
	}

	public void setSortFields(SortField[] sortFields) {
		this.sortFields = sortFields;
	}

	public Class<T> getClazz() {
		return clazz;
	}

	public void setClazz(Class<T> clazz) {
		this.clazz = clazz;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public String[] getFields() {
		return fields;
	}

	public void setFields(String[] fields) {
		this.fields = fields;
	}


	public Filter[] getFilters() {
		return filters;
	}

	public void setFilters(Filter[] filters) {
		this.filters = filters;
	}

	public List<String[]> getSpecial() {
		return special;
	}

	public void setSpecial(List<String[]> special) {
		this.special = special;
	}

	public boolean isHighlight() {
		return highlight;
	}

	public void setHighlight(boolean highlight) {
		this.highlight = highlight;
	}



	
}
